<!DOCTYPE html>
<html>
<body>
<template id="target-template">
<svg width="0" height="0">
<feTurbulence class="target" />
</svg>
</template>
<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
<script>
'use strict';
assertAttributeInterpolation({
  property: 'numOctaves',
  underlying: '3',
  from: '1',
  fromComposite: 'add',
  to: '7',
  toComposite: 'add',
}, [
  {at: -0.4, is: 2},
  {at: 0, is: 4},
  {at: 0.2, is: 5},
  {at: 0.6, is: 8},
  {at: 1, is: 10},
  {at: 1.4, is: 12}
]);

assertAttributeInterpolation({
  property: 'numOctaves',
  underlying: '5',
  from: '1',
  fromComposite: 'replace',
  to: '7',
  toComposite: 'add',
}, [
  {at: -0.4, is: -3},
  {at: 0, is: 1},
  {at: 0.2, is: 3},
  {at: 0.6, is: 8},
  {at: 1, is: 12},
  {at: 1.4, is: 16}
]);

assertAttributeInterpolation({
  property: 'numOctaves',
  underlying: '2',
  from: '1',
  fromComposite: 'add',
  to: '7',
  toComposite: 'replace',
}, [
  {at: -0.4, is: 1},
  {at: 0, is: 3},
  {at: 0.2, is: 4},
  {at: 0.6, is: 5},
  {at: 1, is: 7},
  {at: 1.4, is: 9}
]);

assertAttributeInterpolation({
  property: 'numOctaves',
  underlying: '2',
  from: neutralKeyframe,
  to: '7',
  toComposite: 'replace',
}, [
  {at: -0.4, is: 0},
  {at: 0, is: 2},
  {at: 0.2, is: 3},
  {at: 0.6, is: 5},
  {at: 1, is: 7},
  {at: 1.4, is: 9}
]);
</script>
</body>
</html>
